<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>用户列表界面</title>
  <link rel="stylesheet" th:href="@{/libs/css/jigou/deptList.css}">
</head>
<body>
<div class="box-1">
  <div class="top">
    <a class="right btn btn-success" href="/geren/exited" >退出</a>
    <a class="right btn btn btn-success" href="/geren/toUpdatePassword">修改密码</a>
    <span th:text="${session.data.username}" class="right btn btn-success"></span>
  </div>
  <ul class="nav nav-pills nav-stacked left" style="border: 1px">

    <input type="hidden" id="role" th:value="${session.data.role}">

    <li class="role">
    </li>
    <li>
      <a href="#">查看数据</a>
    </li>
    <li>
      <a href="/jigou/toListOrganization">机构管理</a>
    </li>
    <li>
      <a href="/yonghu/userList">用户管理</a>
    </li>
    <li>
      <a href="#">修改密码</a>
    </li>
  </ul>
  <div class="right">
    <div>
      <input type="hidden" id="resetPassword" th:value="@{/yonghu/resetPassword}">
      <span>姓名：</span>
      <input type="text" id="username">
      <span>用户等级：</span>
      <select id="uRole">
        <option value="0">--请选择--</option>
        <option value="1">四级机构用户</option>
        <option value="2">中支用户</option>
        <option value="3">省公司用户</option>
        <option value="4">管理员</option>
      </select>
      区域/部门：
      <input type="hidden" id="listArea" th:value="@{/yonghu/listArea}">
      <input type="hidden" id="listDept" th:value="@{/yonghu/listDept}">

      <select id="areaid" name="areaid" onchange="listDept()"></select>
      <select id="deptid" name="deptid"></select>
      <button class="btn btn btn-success" onclick="listUserByInfo()">查询</button>
      <a class="btn btn btn-success" href="/yonghu/toInsertUser" >添加用户</a>
    </div>
    <input type="hidden" id="listUser" th:value="@{/yonghu/listUser}">
    <input type="hidden" id="getUserInfo" th:value="@{/yonghu/getUserInfo}">
    <input type="hidden" id="deleteUserById" th:value="@{/yonghu/deleteUserById}">
    <table class="table table-hover">
      <thead>
      <th>用户名</th>
      <th>姓名</th>
      <th>密码</th>
      <th>用户等级</th>
      <th>区域</th>
      <th>部门</th>
      <th>操作</th>
      </thead>
      <tbody id="list">
      </tbody>
    </table>
  </div>
</div>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">即将删除数据</h4>
      </div>
      <div class="modal-body" id="info">
        hello
      </div>
      <div class="modal-footer">
        <span id="yes">
          <button type="button" class="btn btn-primary">是</button>
        </span>

        <button type="button" class="btn btn-default" data-dismiss="modal">否</button>

      </div>
    </div>
  </div>
</div>
</body>

<!--   引入jquery-->
<!--<script th:src="@{/libs/js/jquery/jquery.min.js}"jquery></script>-->
<script src="https://src.axui.cn/src/js/jquery-1.10.2.min.js" type="text/javascript"></script>

<!--    bootstrap样式-->
<link rel="stylesheet" th:href="@{/libs/js/bootstrap-3.4.1-dist/css/bootstrap.min.css}">
<script th:src="@{/libs/js/bootstrap-3.4.1-dist/js/bootstrap.min.js}"></script>
<!--引入js-->
<script th:src="@{/libs/js/yonghu/userList.js}" type="text/javascript"></script>


</html>